package com.hezhiqin.dubbodemoclient;

import com.hezhiqin.api.SayHello;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: homeWork
 * @description:
 * @author: hezhiqin
 * @create: 2020-02-25 13:53
 */
@RestController
public class TestController {

    @Reference(protocol = "dubbo")
    SayHello sayHello;

    @GetMapping("/nidaye")
    @ResponseBody
    public String hello(String s){
        return sayHello.sayHello(s);
    }
}
